#include "stdafx.h"
#include "SpriteOnceMultiFrame.h"

SpriteOnceMultiFrame::SpriteOnceMultiFrame(LPDIRECT3DTEXTURE9 tex, int nCol,int nWidth,int nHeight,int nFrameSpan, int nNumOfFrame,int nLayer,int nOnlyDraw1Line,bool bDrawOnView,bool bCycleMap):
	SpriteMultiFrame(tex,nCol,nWidth,nHeight,nFrameSpan,nNumOfFrame,nLayer,nOnlyDraw1Line,bDrawOnView,bCycleMap),m_nDrawTimes(0)
{

}

SpriteOnceMultiFrame::~SpriteOnceMultiFrame(void)
{
}

bool SpriteOnceMultiFrame::Draw(DWORD dwCurrentTime)
{
	if (0==m_nDrawTimes){
		return false;
	}

	if(!SpriteMultiFrame::Draw(dwCurrentTime)){
		return false;
	}

	if (0==m_nCurrentFrame){
		m_nDrawTimes--;
	}
	return true;
}